package com.sf.fy.uav.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import javax.xml.crypto.Data;

/**
 * <p>
 *
 * </p>
 *
 * @author LTQ
 * @since 2023-10-07
 */
@TableName("user_coupon")
@ApiModel(value = "UserCoupon对象", description = "")
public class UserCoupon implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键id")
    private String id;

    @ApiModelProperty("状态 0:待领取 1:未使用 2:已使用 3:已过期 4:已失效")
    private Integer status;

    @ApiModelProperty("来源方式 1:主动获取 2:被动获取 3:兑换码")
    private Integer source;

    @ApiModelProperty("订单号")
    private String orderSn;

    @ApiModelProperty("优惠券ID")
    private String couponId;

    @ApiModelProperty("用户ID")
    private String userId;

    @ApiModelProperty("使用门槛 0-无门槛,1-有门槛")
    private Byte threshold;

    @ApiModelProperty("门槛金额")
    private BigDecimal thresholdAmount;

    @ApiModelProperty("生效时间")
    private Date effectiveTime;

    public String getOperator() {
        return operator;
    }

    public void setOperator(String operator) {
        this.operator = operator;
    }

    @ApiModelProperty("过期时间")
    private Date expireTime;

    @ApiModelProperty("使用时间")
    @TableField(value = "USE_TIME", fill = FieldFill.INSERT_UPDATE)
    private Date useTime;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("更新时间")
    private Date updateTime;

    @ApiModelProperty("操作人")
    private String operator;

    @ApiModelProperty("用户手机号")
    @TableField(exist = false)
    private String phoneNumber;

    public String getPhoneNumber() {
        return this.phoneNumber;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getSource() {
        return source;
    }

    public void setSource(Integer source) {
        this.source = source;
    }

    public String getOrderSn() {
        return orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    public String getCouponId() {
        return couponId;
    }

    public void setCouponId(String couponId) {
        this.couponId = couponId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public Date getExpireTime() {
        return expireTime;
    }

    public void setExpireTime(Date expireTime) {
        this.expireTime = expireTime;
    }

    public Date getUseTime() {
        return useTime;
    }

    public void setUseTime(Date useTime) {
        this.useTime = useTime;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public String toString() {
        return "UserCoupon{" +
                "id = " + id +
                ", status = " + status +
                ", source = " + source +
                ", orderSn = " + orderSn +
                ", couponId = " + couponId +
                ", userId = " + userId +
                ", expireTime = " + expireTime +
                ", useTime = " + useTime +
                ", createTime = " + createTime +
                ", updateTime = " + updateTime +
                "}";
    }

    public Date getEffectiveTime() {
        return effectiveTime;
    }

    public void setEffectiveTime(Date effectiveTime) {
        this.effectiveTime = effectiveTime;
    }

    public Byte getThreshold() {
        return threshold;
    }

    public void setThreshold(Byte threshold) {
        this.threshold = threshold;
    }

    public BigDecimal getThresholdAmount() {
        return thresholdAmount;
    }

    public void setThresholdAmount(BigDecimal thresholdAmount) {
        this.thresholdAmount = thresholdAmount;
    }
}
